package com.fowo.api.model.product.purchase.record;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fowo.api.common.validator.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/**
 * 产品采购记录 预览导入辅助模型(全字段为文本类型)
 * @author yl_ls
 */
@Getter
@Setter
public class ProductPurchaseRecordImportPo {

  /** 所属产品 */
  @ExcelProperty("所属产品")
  @Size(max = 500, message = "所属产品长度不能超过500")
  private String productIdName;

  @ExcelIgnore
  @Schema(title = "所属产品")
  private String productId;

  /** 供应商 */
  @ExcelProperty("供应商")
  @Size(max = 50, message = "供应商长度不能超过50")
  private String supplierSupplierName;

  @ExcelIgnore
  @Schema(title = "供应商")
  private String supplier;

  /** 采购数量 */
  @ExcelProperty("采购数量")
  @IntegerString(
    message = "采购数量数值格式不正确",
    label = "采购数量",
    min = 0
  )
  private String purchaseNum;

  /** 加工费 */
  @ExcelProperty("加工费")
  @DecimalString(message = "加工费小数格式不正确", label = "加工费")
  private String processCost;

  /** 单价 */
  @ExcelProperty("单价")
  @DecimalString(message = "单价小数格式不正确", label = "单价")
  private String price;

  /** 运费 */
  @ExcelProperty("运费")
  @DecimalString(message = "运费小数格式不正确", label = "运费")
  private String freight;

  /** 是否开票 */
  @ExcelProperty("是否开票")
  @BooleanString(message = "是否开票格式不正确，请使用“是”，“否”")
  private String isInvoice;

  /** 税率 */
  @ExcelProperty("税率")
  @DecimalString(message = "税率小数格式不正确", label = "税率")
  private String taxRate;

  /** 实际交货期 */
  @ExcelProperty("实际交货期")
  @DateTimeString(message = "实际交货期不是有效的时间日期格式")
  private String deliverDate;

  /** 采购单号 */
  @ExcelProperty("采购单号")
  @Size(max = 50, message = "采购单号长度不能超过50")
  private String purchaseOrderCode;

  /** 到货量 */
  @ExcelProperty("到货量")
  @LongString(message = "到货量数值格式不正确", label = "到货量", min = 0L)
  private String quantityReceived;

  /** 仓库 */
  @ExcelProperty("仓库")
  @Size(max = 50, message = "仓库长度不能超过50")
  private String widName;

  @ExcelIgnore
  @Schema(title = "仓库")
  private String wid;

  /** 采购员 */
  @ExcelProperty("采购员")
  @Size(max = 50, message = "采购员长度不能超过50")
  private String optUidName;

  @ExcelIgnore
  @Schema(title = "采购员")
  private String optUid;

  /** 店铺 */
  @ExcelProperty("店铺")
  @Size(max = 50, message = "店铺长度不能超过50")
  private String sidShopName;

  @ExcelIgnore
  @Schema(title = "店铺")
  private String sid;
}
